import random
rel_num = random.randint(1,100)

code = False #状态

while(code == False):
    
    input_num = input("请输入数字:")
    #input_num = float(input_num)
    input_num = int(input_num)
    if (input_num < 1):
        print("请输入大于1的整数！")
    elif(input_num > rel_num):
        print("年轻人，数字大了！")
    elif (input_num < rel_num):
        print ("年轻人，数字小了")
    elif (input_num == rel_num ):
        print ("恭喜你猜对了，年轻人！")
        code = True